package coba.mailing.jdbc;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import coba.mailing.properties.MainProperties;

public class ConnectionFactory {

	public static Connection getConnection()
			throws IOException, ClassNotFoundException, SQLException {

		Class.forName("com.mysql.jdbc.Driver");

		return DriverManager.getConnection(
				MainProperties.getInstance().getProperty("dbUrl"),
				MainProperties.getInstance().getProperty("dbUser"),
				MainProperties.getInstance().getProperty("dbPassword"));

	}

}
